using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace DeskNotes
{
	/// <summary>
	/// RemindersForm displays missed reminders from desknotes. 
	/// Missed are those when user did not interact with notify form.
	/// Reminders form is being open from DeskNotes class. 
	/// Note then registers its RemindersActionHandler
	/// to receive event about action user did for displayed desknote.
	/// Handler is implemented inside NoteForm for complexity :-) and for easy access
	/// to NoteForm UI elements like reminder toolbar.
	/// </summary>
	public class RemindersForm : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Button btnOpen;
		private System.Windows.Forms.Button btnDismissAll;
		private System.Windows.Forms.Button btnDismiss;
		private System.Windows.Forms.Button btnClose;
		private System.Windows.Forms.ListView listReminders;
		private System.Windows.Forms.ColumnHeader text;
		private System.Windows.Forms.ColumnHeader reminder;
		private System.Windows.Forms.ImageList imagesList;
		private System.ComponentModel.IContainer components;

		//private DeskNotes deskNotes = null;

		
		/// <summary>
		/// Closed - form closed no action for desknotes selected
		/// Dismiss - dismiss reminder from form and DeskNote
		/// Open - activate given desknote
		/// </summary>
		internal enum Action : short 
		{
			Closed, 
			Dismiss,
			Open
		}

		public RemindersForm()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		internal RemindersForm(DeskNotes deskNotes)
		{
			InitializeComponent();
			//this.deskNotes = deskNotes;
			this.Disposed +=new EventHandler(deskNotes.RemindersDisposed);
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(RemindersForm));
			this.label1 = new System.Windows.Forms.Label();
			this.btnOpen = new System.Windows.Forms.Button();
			this.btnDismissAll = new System.Windows.Forms.Button();
			this.btnDismiss = new System.Windows.Forms.Button();
			this.btnClose = new System.Windows.Forms.Button();
			this.listReminders = new System.Windows.Forms.ListView();
			this.text = new System.Windows.Forms.ColumnHeader();
			this.reminder = new System.Windows.Forms.ColumnHeader();
			this.imagesList = new System.Windows.Forms.ImageList(this.components);
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.AccessibleDescription = resources.GetString("label1.AccessibleDescription");
			this.label1.AccessibleName = resources.GetString("label1.AccessibleName");
			this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label1.Anchor")));
			this.label1.AutoSize = ((bool)(resources.GetObject("label1.AutoSize")));
			this.label1.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label1.Dock")));
			this.label1.Enabled = ((bool)(resources.GetObject("label1.Enabled")));
			this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.label1.Font = ((System.Drawing.Font)(resources.GetObject("label1.Font")));
			this.label1.Image = ((System.Drawing.Image)(resources.GetObject("label1.Image")));
			this.label1.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label1.ImageAlign")));
			this.label1.ImageIndex = ((int)(resources.GetObject("label1.ImageIndex")));
			this.label1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label1.ImeMode")));
			this.label1.Location = ((System.Drawing.Point)(resources.GetObject("label1.Location")));
			this.label1.Name = "label1";
			this.label1.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label1.RightToLeft")));
			this.label1.Size = ((System.Drawing.Size)(resources.GetObject("label1.Size")));
			this.label1.TabIndex = ((int)(resources.GetObject("label1.TabIndex")));
			this.label1.Text = resources.GetString("label1.Text");
			this.label1.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label1.TextAlign")));
			this.label1.Visible = ((bool)(resources.GetObject("label1.Visible")));
			// 
			// btnOpen
			// 
			this.btnOpen.AccessibleDescription = resources.GetString("btnOpen.AccessibleDescription");
			this.btnOpen.AccessibleName = resources.GetString("btnOpen.AccessibleName");
			this.btnOpen.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnOpen.Anchor")));
			this.btnOpen.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnOpen.BackgroundImage")));
			this.btnOpen.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnOpen.Dock")));
			this.btnOpen.Enabled = ((bool)(resources.GetObject("btnOpen.Enabled")));
			this.btnOpen.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnOpen.FlatStyle")));
			this.btnOpen.Font = ((System.Drawing.Font)(resources.GetObject("btnOpen.Font")));
			this.btnOpen.Image = ((System.Drawing.Image)(resources.GetObject("btnOpen.Image")));
			this.btnOpen.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnOpen.ImageAlign")));
			this.btnOpen.ImageIndex = ((int)(resources.GetObject("btnOpen.ImageIndex")));
			this.btnOpen.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnOpen.ImeMode")));
			this.btnOpen.Location = ((System.Drawing.Point)(resources.GetObject("btnOpen.Location")));
			this.btnOpen.Name = "btnOpen";
			this.btnOpen.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnOpen.RightToLeft")));
			this.btnOpen.Size = ((System.Drawing.Size)(resources.GetObject("btnOpen.Size")));
			this.btnOpen.TabIndex = ((int)(resources.GetObject("btnOpen.TabIndex")));
			this.btnOpen.Text = resources.GetString("btnOpen.Text");
			this.btnOpen.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnOpen.TextAlign")));
			this.btnOpen.Visible = ((bool)(resources.GetObject("btnOpen.Visible")));
			this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
			// 
			// btnDismissAll
			// 
			this.btnDismissAll.AccessibleDescription = resources.GetString("btnDismissAll.AccessibleDescription");
			this.btnDismissAll.AccessibleName = resources.GetString("btnDismissAll.AccessibleName");
			this.btnDismissAll.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDismissAll.Anchor")));
			this.btnDismissAll.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDismissAll.BackgroundImage")));
			this.btnDismissAll.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDismissAll.Dock")));
			this.btnDismissAll.Enabled = ((bool)(resources.GetObject("btnDismissAll.Enabled")));
			this.btnDismissAll.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDismissAll.FlatStyle")));
			this.btnDismissAll.Font = ((System.Drawing.Font)(resources.GetObject("btnDismissAll.Font")));
			this.btnDismissAll.Image = ((System.Drawing.Image)(resources.GetObject("btnDismissAll.Image")));
			this.btnDismissAll.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDismissAll.ImageAlign")));
			this.btnDismissAll.ImageIndex = ((int)(resources.GetObject("btnDismissAll.ImageIndex")));
			this.btnDismissAll.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDismissAll.ImeMode")));
			this.btnDismissAll.Location = ((System.Drawing.Point)(resources.GetObject("btnDismissAll.Location")));
			this.btnDismissAll.Name = "btnDismissAll";
			this.btnDismissAll.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDismissAll.RightToLeft")));
			this.btnDismissAll.Size = ((System.Drawing.Size)(resources.GetObject("btnDismissAll.Size")));
			this.btnDismissAll.TabIndex = ((int)(resources.GetObject("btnDismissAll.TabIndex")));
			this.btnDismissAll.Text = resources.GetString("btnDismissAll.Text");
			this.btnDismissAll.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDismissAll.TextAlign")));
			this.btnDismissAll.Visible = ((bool)(resources.GetObject("btnDismissAll.Visible")));
			this.btnDismissAll.Click += new System.EventHandler(this.btnDismissAll_Click);
			// 
			// btnDismiss
			// 
			this.btnDismiss.AccessibleDescription = resources.GetString("btnDismiss.AccessibleDescription");
			this.btnDismiss.AccessibleName = resources.GetString("btnDismiss.AccessibleName");
			this.btnDismiss.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDismiss.Anchor")));
			this.btnDismiss.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDismiss.BackgroundImage")));
			this.btnDismiss.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDismiss.Dock")));
			this.btnDismiss.Enabled = ((bool)(resources.GetObject("btnDismiss.Enabled")));
			this.btnDismiss.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDismiss.FlatStyle")));
			this.btnDismiss.Font = ((System.Drawing.Font)(resources.GetObject("btnDismiss.Font")));
			this.btnDismiss.Image = ((System.Drawing.Image)(resources.GetObject("btnDismiss.Image")));
			this.btnDismiss.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDismiss.ImageAlign")));
			this.btnDismiss.ImageIndex = ((int)(resources.GetObject("btnDismiss.ImageIndex")));
			this.btnDismiss.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDismiss.ImeMode")));
			this.btnDismiss.Location = ((System.Drawing.Point)(resources.GetObject("btnDismiss.Location")));
			this.btnDismiss.Name = "btnDismiss";
			this.btnDismiss.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDismiss.RightToLeft")));
			this.btnDismiss.Size = ((System.Drawing.Size)(resources.GetObject("btnDismiss.Size")));
			this.btnDismiss.TabIndex = ((int)(resources.GetObject("btnDismiss.TabIndex")));
			this.btnDismiss.Text = resources.GetString("btnDismiss.Text");
			this.btnDismiss.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDismiss.TextAlign")));
			this.btnDismiss.Visible = ((bool)(resources.GetObject("btnDismiss.Visible")));
			this.btnDismiss.Click += new System.EventHandler(this.btnDismiss_Click);
			// 
			// btnClose
			// 
			this.btnClose.AccessibleDescription = resources.GetString("btnClose.AccessibleDescription");
			this.btnClose.AccessibleName = resources.GetString("btnClose.AccessibleName");
			this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnClose.Anchor")));
			this.btnClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnClose.BackgroundImage")));
			this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnClose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnClose.Dock")));
			this.btnClose.Enabled = ((bool)(resources.GetObject("btnClose.Enabled")));
			this.btnClose.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnClose.FlatStyle")));
			this.btnClose.Font = ((System.Drawing.Font)(resources.GetObject("btnClose.Font")));
			this.btnClose.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.Image")));
			this.btnClose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.ImageAlign")));
			this.btnClose.ImageIndex = ((int)(resources.GetObject("btnClose.ImageIndex")));
			this.btnClose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnClose.ImeMode")));
			this.btnClose.Location = ((System.Drawing.Point)(resources.GetObject("btnClose.Location")));
			this.btnClose.Name = "btnClose";
			this.btnClose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnClose.RightToLeft")));
			this.btnClose.Size = ((System.Drawing.Size)(resources.GetObject("btnClose.Size")));
			this.btnClose.TabIndex = ((int)(resources.GetObject("btnClose.TabIndex")));
			this.btnClose.Text = resources.GetString("btnClose.Text");
			this.btnClose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.TextAlign")));
			this.btnClose.Visible = ((bool)(resources.GetObject("btnClose.Visible")));
			this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
			// 
			// listReminders
			// 
			this.listReminders.AccessibleDescription = resources.GetString("listReminders.AccessibleDescription");
			this.listReminders.AccessibleName = resources.GetString("listReminders.AccessibleName");
			this.listReminders.Alignment = ((System.Windows.Forms.ListViewAlignment)(resources.GetObject("listReminders.Alignment")));
			this.listReminders.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("listReminders.Anchor")));
			this.listReminders.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("listReminders.BackgroundImage")));
			this.listReminders.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
																							this.text,
																							this.reminder});
			this.listReminders.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("listReminders.Dock")));
			this.listReminders.Enabled = ((bool)(resources.GetObject("listReminders.Enabled")));
			this.listReminders.Font = ((System.Drawing.Font)(resources.GetObject("listReminders.Font")));
			this.listReminders.FullRowSelect = true;
			this.listReminders.GridLines = true;
			this.listReminders.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("listReminders.ImeMode")));
			this.listReminders.LabelWrap = ((bool)(resources.GetObject("listReminders.LabelWrap")));
			this.listReminders.Location = ((System.Drawing.Point)(resources.GetObject("listReminders.Location")));
			this.listReminders.Name = "listReminders";
			this.listReminders.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("listReminders.RightToLeft")));
			this.listReminders.Size = ((System.Drawing.Size)(resources.GetObject("listReminders.Size")));
			this.listReminders.SmallImageList = this.imagesList;
			this.listReminders.TabIndex = ((int)(resources.GetObject("listReminders.TabIndex")));
			this.listReminders.Text = resources.GetString("listReminders.Text");
			this.listReminders.View = System.Windows.Forms.View.Details;
			this.listReminders.Visible = ((bool)(resources.GetObject("listReminders.Visible")));
			this.listReminders.DoubleClick += new System.EventHandler(this.listReminders_DoubleClick);
			this.listReminders.SelectedIndexChanged += new System.EventHandler(this.listReminders_SelectedIndexChanged);
			// 
			// text
			// 
			this.text.Text = resources.GetString("text.Text");
			this.text.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("text.TextAlign")));
			this.text.Width = ((int)(resources.GetObject("text.Width")));
			// 
			// reminder
			// 
			this.reminder.Text = resources.GetString("reminder.Text");
			this.reminder.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("reminder.TextAlign")));
			this.reminder.Width = ((int)(resources.GetObject("reminder.Width")));
			// 
			// imagesList
			// 
			this.imagesList.ImageSize = ((System.Drawing.Size)(resources.GetObject("imagesList.ImageSize")));
			this.imagesList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imagesList.ImageStream")));
			this.imagesList.TransparentColor = System.Drawing.Color.Transparent;
			// 
			// RemindersForm
			// 
			this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
			this.AccessibleName = resources.GetString("$this.AccessibleName");
			this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
			this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
			this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
			this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.CancelButton = this.btnClose;
			this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
			this.Controls.Add(this.listReminders);
			this.Controls.Add(this.btnClose);
			this.Controls.Add(this.btnDismiss);
			this.Controls.Add(this.btnDismissAll);
			this.Controls.Add(this.btnOpen);
			this.Controls.Add(this.label1);
			this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
			this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
			this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
			this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
			this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
			this.Name = "RemindersForm";
			this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
			this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
			this.Text = resources.GetString("$this.Text");
			this.Closing += new System.ComponentModel.CancelEventHandler(this.RemindersForm_Closing);
			this.ResumeLayout(false);

		}
		#endregion
		/// <summary>
		/// Adds desknote into reminders list box.
		/// </summary>
		/// <param name="note">Note to list as missed reminder and being notified when user interacts with list.</param>
		internal ListViewItem AddNote(Note note)
		{
			System.Text.StringBuilder text = new System.Text.StringBuilder( 50 );
            string t = note.PlainText;
            if (t.Length > 50 )
			{
				text.Insert(0, t.Substring(0, 47));
				text.Append("...");
			}
			else 
				text.Insert(0, t);

			ListViewItem noteItem = new ListViewItem( text.ToString().Replace( "\n", " " ));
			noteItem.SubItems.Add( note.AlarmText );
			noteItem.Tag = note.MissedRemindersHandler;
			noteItem.ImageIndex = 0;
			listReminders.Items.Add( noteItem );
			if (this.Visible)
				this.Activate();
			else
				this.Show();
			return noteItem;
		}

		/// <summary>
		/// Remove note from missed reminders window
		/// </summary>
		/// <param name="noteItem">note item existing in window</param>
		internal void RemoveNote(ListViewItem noteItem)
		{
			noteItem.Tag = null;
			listReminders.Items.Remove(noteItem);
			if (listReminders.Items.Count == 0)
				this.Close();
		}

		/// <summary>
		/// When form is closed inform Desknotes about it.
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void RemindersForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			//Send messages to all notes 
			foreach (ListViewItem item in listReminders.Items)
			{
				RemindersActionHandler handler = (RemindersActionHandler)item.Tag;
				item.Tag = null;
				handler(this, new RemindersActionEventArgs(Action.Closed));
			}
		}

		/// <summary>
		/// Open selected reminded desknote
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnOpen_Click(object sender, System.EventArgs e)
		{
			foreach( ListViewItem item in listReminders.SelectedItems)
			{
				RemindersActionHandler handler = (RemindersActionHandler)item.Tag;
				handler(this, new RemindersActionEventArgs(Action.Open));
			}
		}
		/// <summary>
		/// Remove all reminders from desknotes in list of missed reminders
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnDismissAll_Click(object sender, System.EventArgs e)
		{
			foreach( ListViewItem item in listReminders.Items)
			{
				RemindersActionHandler handler = (RemindersActionHandler)item.Tag;
				item.Tag = null;
				handler(this, new RemindersActionEventArgs(Action.Dismiss));
			}
		}

		/// <summary>
		/// Remove missed reminders from selected desknotes
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnDismiss_Click(object sender, System.EventArgs e)
		{
			foreach( ListViewItem item in listReminders.SelectedItems)
			{
				RemindersActionHandler handler = (RemindersActionHandler)item.Tag;
				item.Tag = null;
				handler(this, new RemindersActionEventArgs(Action.Dismiss));
			}
		}

		/// <summary>
		/// Activate selected Desknote
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void listReminders_DoubleClick(object sender, System.EventArgs e)
		{
			foreach( ListViewItem item in listReminders.SelectedItems)
			{
				RemindersActionHandler handler = (RemindersActionHandler)item.Tag;
				handler(this, new RemindersActionEventArgs(Action.Open));
				//we need just one item, quit now. Not a nice code, but better than enumeration
				return;
			}
		}
		/// <summary>
		/// Enables/disables buttons when there are selected or no selected items.
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void listReminders_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			if(listReminders.SelectedItems.Count > 0)
			{
				this.btnDismiss.Enabled = true;
				this.btnOpen.Enabled = true;
			} 
			else 
			{
				this.btnDismiss.Enabled = false;
				this.btnOpen.Enabled = false;
			}
		}

		private void btnClose_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

	}

	/// <summary>
	/// Event args send to handler contains what action taken for what reminders.
	/// </summary>
	internal class RemindersActionEventArgs : System.EventArgs
	{
		/// <summary>
		/// 
		/// </summary>
		private readonly RemindersForm.Action action;
		//private readonly long[] ids;

		/// <summary>
		/// Retrieve what user wants to do with missed reminder.
		/// </summary>
		internal RemindersForm.Action PostReminderAction
		{
			get
			{
				return action;
			}
		}

		/// <summary>
		/// Event content with action for note affected by action
		/// </summary>
		/// 
		internal RemindersActionEventArgs( RemindersForm.Action action )
		{
			this.action = action;
		}
	}
	/// <summary>
	/// Class interested in receiving feedback from missedrReminders form registers for this event.
	/// </summary>
	internal delegate void RemindersActionHandler( object sender, RemindersActionEventArgs args );
}
